cmake_minimum_required(VERSION 3.5)

project(Utils VERSION 1.0.0)

set(CMAKE_CXX_STANDARD 17)

set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

add_library(${PROJECT_NAME} SHARED 
    src/BinaryIO.cpp
    src/Utils.cpp
    src/Rsa.cpp
    src/SensitiveFilter.cpp
)

include_directories(${zlib_BINARY_DIR})
include_directories(include/Utils)

target_link_libraries(${PROJECT_NAME} PUBLIC nlohmann_json zlib)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN")
target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>" "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")